﻿@page
@using Damselfly.Core.DbModels.Authentication

@attribute [IgnoreAntiforgeryToken]
@inject SignInManager<AppIdentityUser> SignInManager

@functions {

    public async Task<IActionResult> OnPost()
    {
        return await OnGet();
    }

    public async Task<IActionResult> OnGet()
    {
        if( SignInManager.IsSignedIn(User) )
        {
            await SignInManager.SignOutAsync();
        }

        return Redirect("~/Identity/Account/Login");
    }

}